-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes error when reducing Fields
with a condition
on ImmersedBoundaryGrids
#3440
Conversation
The CPU tests all pass, but it seems like the GPU server isn't working? Does something need to be rebooted? |
Yeah, the GPU server is down right now, linked to construction happening at MIT. Hopefully it will be back up in a few days. |
Fields
with a condition
on ImmersedBoundaryGrids
Fields
with a condition
on ImmersedBoundaryGrids
Co-authored-by: Gregory L. Wagner <[email protected]>
Co-authored-by: Gregory L. Wagner <[email protected]>
Co-authored-by: Gregory L. Wagner <[email protected]>
Tests are failing rn with an error I cannot reproduce:
|
It's because there is no method for |
….jl into tc/immersed-reduction
Thanks @simone-silvestri. I wonder why I wasn't able to reproduce the error locally though. I even tested it on the GPU but everything passed somehow. Seems like tests pass. I just need an approval and I'll merge. |
@@ -21,6 +21,13 @@ const IF = AbstractField{<:Any, <:Any, <:Any, <:ImmersedBoundaryGrid} | |||
@inline condition_operand(func::Function, op::IF, ::Nothing, mask) = ConditionalOperation(op; func, condition=NotImmersed(truefunc), mask) | |||
@inline condition_operand(func::typeof(identity), op::IF, ::Nothing, mask) = ConditionalOperation(op; func, condition=NotImmersed(truefunc), mask) | |||
|
|||
@inline function condition_operand(func::Function, op::IF, cond::AbstractArray, mask) | |||
arch = architecture(op.grid) | |||
arch_condition = arch_array(arch, cond) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if we make this work also for fields, which are AbstractArrays
, but do not have an arch_array
method defined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something like
arch_condition = arch_array(arch, cond) | |
arch_condition = arch_array(arch, parent(cond)) |
might suffice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on_architecture
was meant for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something like
might suffice
I don't like that. Why not keep it as a Field?
This PR fixes an "ambiguous method" error that happens when trying to calculate an
Average()
(probably any reduction) with a givencondition
onImmersedBoundaryGrids
.Thanks to @glwagner for helping me find the proper method definition.
Closes #3439